CREATE TABLE [dbo].[kafedra]
(
[ik_kaf] [int] NOT NULL IDENTITY(1, 1),
[ik_fac] [int] NULL,
[cname_kaf] [varchar] (100) COLLATE Cyrillic_General_CI_AS NOT NULL,
[cshort_name_kaf] [varchar] (15) COLLATE Cyrillic_General_CI_AS NULL,
[kolvo] [float] NULL,
[kDateExit] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[kafedra] ADD CONSTRAINT [PK_departments] PRIMARY KEY CLUSTERED  ([ik_kaf]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[kafedra] ADD CONSTRAINT [IX_departments] UNIQUE NONCLUSTERED  ([cname_kaf]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[kafedra] ADD CONSTRAINT [IX_kafedra] UNIQUE NONCLUSTERED  ([cshort_name_kaf]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[kafedra] ADD CONSTRAINT [FK_kafedra_Fac] FOREIGN KEY ([ik_fac]) REFERENCES [dbo].[Fac] ([Ik_fac])
GO
